projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c001833
)
GtkCssProvider: Small optimization.
author
Carlos Garnacho
<carlosg@gnome.org>
Wed, 4 Aug 2010 09:36:21 +0000
(11:36 +0200)
committer
Carlos Garnacho
<carlosg@gnome.org>
Sat, 4 Dec 2010 14:37:33 +0000
(15:37 +0100)
gtk/gtkcssprovider.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcssprovider.c
b/gtk/gtkcssprovider.c
index 67dc3f68cec04232353fa94831abb81b5bf09e0a..8deae7e75ce0e38eb936b8ed38077e68bb29f4d3 100644
(file)
--- a/
gtk/gtkcssprovider.c
+++ b/
gtk/gtkcssprovider.c
@@
-429,10
+429,12
@@
compare_selector (GtkWidgetPath *path,
GSList *elements = selector->elements;
gboolean match = TRUE;
guint64 score = 0;
+ guint len;
guint i = 0;
- while (elements && match &&
- i < gtk_widget_path_length (path))
+ len = gtk_widget_path_length (path);
+
+ while (elements && match && i < len)
{
SelectorElement *elem;
guint8 elem_score;